export default function counter(initState = 0, action) {
  const { type } = action;
  switch (type) {
    case 'INCREMENT':
      return initState + 1;
    case 'DECREMENT':
      return initState - 1;
    default:
      return initState
  }
}